n, k, m = map(int, input().split())
scs = []
for i in range(n):
    x = list(map(int, input().split()))
    x.sort()
    sc = sum(x[1: -1]) / (k - 2)
    scs.append(sc)
scs.sort()
print(" ".join(["%.3f" % i for i in scs[-m:]]))
